file handling with example